home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_05
/
allison
/
tset.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-12
|
427b
|
27 lines
LISTING 25 - Tests the SetOfInt class
// tset.cpp
#include <iostream.h>
#include "set.h"
main()
{
SetOfInt s;
s.insert(77);
s.insert(33);
s.insert(500);
cout << s << endl;
s.remove(77);
cout << s << endl;
cout << "s "
<< (s.contains(77) ? "does" : "does not")
<< " contain 77" << endl;
return 0;
}
{77,33,500}
{33,500}
s does not contain 77